import request from "@/utils/request";
const BASE_URL = "admin";

// 新增排班信息接口函数
export const addScheduleInfo = (params) => {
  return request.post(`${BASE_URL}/schedule/addScheduleInfo`, params);
};

// 删除排班信息接口函数
export const deleteScheduleInfo = (id) => {
  return request.delete(`${BASE_URL}/schedule/deleteScheduleInfo?id=${id}`);
};

// 更新排班信息接口函数
export const updateScheduleInfo = (params) => {
  return request.put(`${BASE_URL}/schedule/updateScheduleInfo?id=${params.id}`, params);
};

// 查询排班信息接口函数
export const queryScheduleInfo = (patientId, adviceId) => {
  const params = {};
  if (patientId !== undefined) {
    params.patientId = patientId;
  }
  if (adviceId !== undefined) {
    params.adviceId = adviceId;
  }
  return request.get(`${BASE_URL}/schedule/queryScheduleInfo`, {
    params,
  });
};

//查询所有的治疗师排班信息
export const queryAllTherapistScheduleInfo = (params) =>
  request.get(`${BASE_URL}/schedule/queryAllTherapistScheduleInfo`, { params });


//查询所有的治疗设备排班信息
export const queryAllEquipmentScheduleInfo = (params) =>
  request.get(`${BASE_URL}/schedule/queryAllEquipmentScheduleInfo`, { params });

//查询全部的治疗室信息和对应的治疗设备
export const queryAllTreatmentRoomNameAndId = (params) =>
  request.get(`${BASE_URL}/treatmentRoom/queryAllTreatmentRoomNameAndId`, { params });

//查询所有治疗师
export const queryAllTherapistInfo = (params) =>
  request.get(`${BASE_URL}/doctor/queryAllTherapistInfoWithoutPageAndSize`, { params });